<?php


namespace app\controller;


use app\model\dictionaryTypeModel;
use think\facade\Request;

class dictionaryType
{
private $model;

    public function __construct()
    {
        $this->model = new dictionaryTypeModel();
}

    public function getList()
    {
        $data=$this->model->select()->toArray();
        return json(['data'=>$data,'meta'=>['status'=>200]]);
}
    public function add()
    {
        $data = Request::post();
        $this->model->addData($data);
        return json(['meta'=>['msg'=>'新增成功','status'=>200]]);
    }
}